package com.lazy.book.pojo.system.pojo.po;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.sz.mysql.EntityChangeListener;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
* <p>
* 操作日志记录
* </p>
*
* @author sz-admin
* @since 2025-07-02
*/
@Data
@Table(value = "sys_oper_log", onInsert = EntityChangeListener.class, onUpdate = EntityChangeListener.class)
@Schema(description = "操作日志记录")
public class SysOperLog implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    @Schema(description ="日志主键")
    private Long operId;

    @Schema(description ="模块标题")
    private String title;

    @Schema(description ="业务类型（0其它 1新增 2修改 3删除）")
    private Integer businessType;

    @Schema(description ="描述")
    private String disk;

    @Schema(description ="方法名称")
    private String method;

    @Schema(description ="请求方式")
    private String requestMethod;

    @Schema(description ="操作类别（0其它 1后台用户 2手机端用户）")
    private Integer operatorType;

    @Schema(description ="操作人员")
    private String operName;

    @Schema(description ="请求URL")
    private String operUrl;

    @Schema(description ="主机地址")
    private String operIp;

    @Schema(description ="操作地点")
    private String operLocation;

    @Schema(description ="请求参数")
    private String operParam;

    @Schema(description ="返回参数")
    private String jsonResult;

    @Schema(description ="操作状态（0正常 1异常）")
    private Integer status;

    @Schema(description ="错误消息")
    private String errorMsg;

    @Schema(description ="操作时间")
    private LocalDateTime operTime;

    @Schema(description ="tid")
    private String tid;

}